/**
 * 
 */
package com.marchevskiy.illiniScholar;

import com.marchevskiy.illiniScholar.util.Credentials;
import com.marchevskiy.illiniScholar.util.Logger;

import android.app.Application;
import android.util.Log;

/**
 * @author jandro
 *
 */
public class ScholarApp extends Application {
	private boolean isConnected = false;
	Logger l = new Logger("ScholarApp-Debug");
	
	/**
	 * 
	 */
	public ScholarApp() {
		log("Creating new application instance without arg");
		this.isConnected = connect(null);
	}
	
	public ScholarApp(Credentials c) {
		this.isConnected = connect(c);
	}
	
	public int getLayout() {
		return (isConnected)?R.layout.main:R.layout.login_layout;
	}
	
	private boolean connect(Credentials c) {
		if (c != null) {
			
		}
		return false;
	}
	
	private void log(String s) {
    	l.log(s);
    }

}
